package com.xiaoshuidi.cloud.module.contract.convert.contract;

import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.signingSubject.ContractSubjectApartmentVO;
import com.xiaoshuidi.cloud.module.contract.controller.admin.contract.vo.signingSubject.ContractSubjectRespVO;
import com.xiaoshuidi.cloud.module.rooms.api.apartment.dto.ApartmentListDto;
import com.xiaoshuidi.cloud.module.system.api.auth.dto.UserIdAuthRespDTO;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * 签约主体房源关联 Convert
 *
 * @author 合房租赁
 */
@Mapper
public interface ContractSubjectConvert {

    ContractSubjectConvert INSTANCE = Mappers.getMapper(ContractSubjectConvert.class);

    @Mapping(target = "authenticationId", source = "id")
    ContractSubjectRespVO convert(UserIdAuthRespDTO bean);

    @Mapping(target = "authenticationId", source = "id")
    List<ContractSubjectRespVO> convertList(List<UserIdAuthRespDTO> bean);

    ContractSubjectApartmentVO convertDTO2ContractSubjectApartmentVO(ApartmentListDto dto);

    List<ContractSubjectApartmentVO> convertDTOs2ContractSubjectApartmentVOs(List<ApartmentListDto> dto);

}
